<?php

namespace App\Http\Controllers\Api;

use Illuminate\Http\Request;
use \Illuminate\Validation\Validator;
use App\Http\Controllers\Controller;

class BaseController extends Controller
{
    protected $user = [];

    public function __construct()
    {
        if (auth('api')->user()) {
            $this->user = auth('api')->user()->toArray();
            $this->user['user_id'] = $this->user['id'];
        }

        if (env('APP_DEV') == true) {
            $this->user['user_id'] = 1;
        }
    }

}